<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>CUTLASS: tensor_fill.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="cutlass-logo-small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CUTLASS
   </div>
   <div id="projectbrief">CUDA Templates for Linear Algebra Subroutines and Solvers</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_4eeb864c4eec08c7d6b9d3b0352cfdde.html">tools</a></li><li class="navelem"><a class="el" href="dir_88de82f9e8d739a2f42f92d95f0d7933.html">util</a></li><li class="navelem"><a class="el" href="dir_7e9e609009df72bf6226de354e72c328.html">include</a></li><li class="navelem"><a class="el" href="dir_ade2f6ff57439d30f4164e14e54bcf30.html">cutlass</a></li><li class="navelem"><a class="el" href="dir_ff60863f958a43c892071bb1f8a4c81a.html">util</a></li><li class="navelem"><a class="el" href="dir_01de8928c960cafb028e5f164701e1de.html">reference</a></li><li class="navelem"><a class="el" href="dir_b790a865367d69962c5919afdba4a959.html">host</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">host/tensor_fill.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="host_2tensor__fill_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/***************************************************************************************************</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2017-2019, NVIDIA CORPORATION.  All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without modification, are permitted</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * provided that the following conditions are met:</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *     * Redistributions of source code must retain the above copyright notice, this list of</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *       conditions and the following disclaimer.</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *     * Redistributions in binary form must reproduce the above copyright notice, this list of</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *       conditions and the following disclaimer in the documentation and/or other materials</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *       provided with the distribution.</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *     * Neither the name of the NVIDIA CORPORATION nor the names of its contributors may be used</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *       to endorse or promote products derived from this software without specific prior written</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *       permission.</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND ANY EXPRESS OR</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * STRICT LIABILITY, OR TOR (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> **************************************************************************************************/</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment">/* \file</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">  \brief Provides several functions for filling tensors with data.</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment">// Standard Library includes</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &lt;utility&gt;</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &lt;cstdlib&gt;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &lt;cmath&gt;</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment">// Cutlass includes</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="cutlass_8h.html">cutlass/cutlass.h</a>&quot;</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="complex_8h.html">cutlass/complex.h</a>&quot;</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="array_8h.html">cutlass/array.h</a>&quot;</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="numeric__types_8h.html">cutlass/numeric_types.h</a>&quot;</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="distribution_8h.html">cutlass/util/distribution.h</a>&quot;</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="host_2tensor__foreach_8h.html">tensor_foreach.h</a>&quot;</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecutlass.html">cutlass</a> {</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="keyword">namespace </span>reference {</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="keyword">namespace </span>host {</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="keyword">namespace </span>detail {</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html">   59</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html">TensorFillFunc</a> {</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a4a75d3f07143d0a5d98e1d6f3115cfeb">   61</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a4a75d3f07143d0a5d98e1d6f3115cfeb">TensorView</a> = <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a>;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;  <span class="comment">// Data members</span></div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a49d7728b3b07ddc6e063a8aedf2c292c">   67</a></span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a4a75d3f07143d0a5d98e1d6f3115cfeb">TensorView</a> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a49d7728b3b07ddc6e063a8aedf2c292c">view</a>;</div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#ad52ccd0a3cd4685b52746abe5ad7df71">   68</a></span>&#160;  Element <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#ad52ccd0a3cd4685b52746abe5ad7df71">value</a>;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  <span class="comment">// Methods</span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a55353997540e39108d75456f681a703d">   74</a></span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a55353997540e39108d75456f681a703d">TensorFillFunc</a>(</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a4a75d3f07143d0a5d98e1d6f3115cfeb">TensorView</a> <span class="keyword">const</span> &amp;view_ = <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a4a75d3f07143d0a5d98e1d6f3115cfeb">TensorView</a>(), </div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    Element value_ = Element(0)</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;  ): view(view_), value(value_) { }</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a5fd28f9610e15afd33e1e8f56e1b9021">   79</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a5fd28f9610e15afd33e1e8f56e1b9021">operator()</a>(<a class="code" href="structcutlass_1_1Coord.html">Coord&lt;Layout::kRank&gt;</a> <span class="keyword">const</span> &amp; coord)<span class="keyword"> const </span>{</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    view.at(coord) = <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#ad52ccd0a3cd4685b52746abe5ad7df71">value</a>;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  }</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;};</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;} <span class="comment">// namespace detail</span></div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="namespacecutlass_1_1reference_1_1host.html#a81b0f81940ce0ecc0d486d2f45659f6e">   92</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a81b0f81940ce0ecc0d486d2f45659f6e">TensorFill</a>(</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a> dst,    </div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;  Element val = Element(0)) {               </div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html">detail::TensorFillFunc&lt;Element, Layout&gt;</a> func(dst, val);</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;  <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a8c798c04df572b34e3ed3976d69f993d">TensorForEach</a>(</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    dst.<a class="code" href="classcutlass_1_1TensorView.html#a7d3914dd5042c9c40be9e21a7b4e9ece">extent</a>(),</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    func</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  );</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;}</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="keyword">namespace </span>detail {</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> Element&gt;</div><div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html">  110</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html">RandomGaussianFunc</a> {</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a0d83ee32fde2512db11ed9b5f7ae1534">  112</a></span>&#160;  uint64_t <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a0d83ee32fde2512db11ed9b5f7ae1534">seed</a>;</div><div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a5da7c7b953aa178bb356ba8578245d89">  113</a></span>&#160;  <span class="keywordtype">double</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a5da7c7b953aa178bb356ba8578245d89">mean</a>;</div><div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a4138398f954d5dfd1e968caee2918835">  114</a></span>&#160;  <span class="keywordtype">double</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a4138398f954d5dfd1e968caee2918835">stddev</a>;</div><div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a4c9943f36faab7d4928b1f130d0b784c">  115</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a4c9943f36faab7d4928b1f130d0b784c">int_scale</a>;</div><div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a6b96ec27d0f7df4c4a1bd451b29a69fe">  116</a></span>&#160;  <span class="keywordtype">double</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a6b96ec27d0f7df4c4a1bd451b29a69fe">pi</a>;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;  <span class="comment">// Methods</span></div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a45ca53d7fcac978533361d8fc5f15311">  121</a></span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a45ca53d7fcac978533361d8fc5f15311">RandomGaussianFunc</a>(</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    uint64_t seed_ = 0, </div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="keywordtype">double</span> mean_ = 0, </div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <span class="keywordtype">double</span> stddev_ = 1,</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="keywordtype">int</span> int_scale_ = -1</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;  ):</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    seed(seed_), mean(mean_), stddev(stddev_), int_scale(int_scale_), pi(<a class="code" href="namespacestd.html">std</a>::acos(-1)) {</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;      std::srand((<span class="keywordtype">unsigned</span>)seed);</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;  }</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a0208d33ceb87f0fc273dc17a66a5e990">  132</a></span>&#160;  Element <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a0208d33ceb87f0fc273dc17a66a5e990">operator()</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="comment">// Box-Muller transform to generate random numbers with Normal distribution</span></div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <span class="keywordtype">double</span> u1 = double(std::rand()) / double(RAND_MAX);</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    <span class="keywordtype">double</span> u2 = double(std::rand()) / double(RAND_MAX);</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    <span class="comment">// Compute Gaussian random value</span></div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="keywordtype">double</span> rnd = <a class="code" href="namespacecutlass.html#a28f05d94dbdfc97cddbeab3a5d23839d">std::sqrt</a>(-2 * <a class="code" href="namespacecutlass.html#a67f9e83dd59615eff837ea66984c121c">std::log</a>(u1)) * <a class="code" href="namespacecutlass.html#a2337866060023f87d4d821850738541f">std::cos</a>(2 * pi * u2);</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    rnd = mean + stddev * rnd;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <span class="comment">// Scale and convert final result</span></div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    Element result;</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    <span class="keywordflow">if</span> (int_scale &gt;= 0) {</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;      rnd = double(int64_t(rnd * <span class="keywordtype">double</span>(1 &lt;&lt; int_scale))) / double(1 &lt;&lt; int_scale);</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;      result = <span class="keyword">static_cast&lt;</span>Element<span class="keyword">&gt;</span>(rnd);</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    }</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <span class="keywordflow">else</span> {</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;      result = <span class="keyword">static_cast&lt;</span>Element<span class="keyword">&gt;</span>(rnd);</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    }</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;  }</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;};</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> Element&gt;</div><div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html">  159</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html">RandomGaussianFunc</a>&lt;<a class="code" href="classcutlass_1_1complex.html">complex</a>&lt;Element&gt; &gt; {</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a8239acd9e3b11b0b6a3f26f48f18b508">  161</a></span>&#160;  uint64_t <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a8239acd9e3b11b0b6a3f26f48f18b508">seed</a>;</div><div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#ad8c60b0630a2867fd80a0d09a3cf63cd">  162</a></span>&#160;  <span class="keywordtype">double</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#ad8c60b0630a2867fd80a0d09a3cf63cd">mean</a>;</div><div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a4c1cec1d0871654b9e3c5cf132099034">  163</a></span>&#160;  <span class="keywordtype">double</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a4c1cec1d0871654b9e3c5cf132099034">stddev</a>;</div><div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a6a906b7ae9c17b6ebe2063d652f3ab50">  164</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a6a906b7ae9c17b6ebe2063d652f3ab50">int_scale</a>;</div><div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a61f603633246ab86c8f46e6cbe0f257c">  165</a></span>&#160;  <span class="keywordtype">double</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a61f603633246ab86c8f46e6cbe0f257c">pi</a>;</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;  <span class="comment">// Methods</span></div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a72b71664e9ddc5ce392e1db822cfdada">  170</a></span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a72b71664e9ddc5ce392e1db822cfdada">RandomGaussianFunc</a>(</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    uint64_t seed_ = 0, </div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <span class="keywordtype">double</span> mean_ = 0, </div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="keywordtype">double</span> stddev_ = 1,</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <span class="keywordtype">int</span> int_scale_ = -1</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;  ):</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    seed(seed_), mean(mean_), stddev(stddev_), int_scale(int_scale_), pi(<a class="code" href="namespacestd.html">std</a>::acos(-1)) {</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;      std::srand((<span class="keywordtype">unsigned</span>)seed);</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;  }</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a04ad19f3f63c0cba77a76a2ce243b727">  181</a></span>&#160;  <a class="code" href="classcutlass_1_1complex.html">complex&lt;Element&gt;</a> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a04ad19f3f63c0cba77a76a2ce243b727">operator()</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    Element reals[2];</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 2; ++i) {</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;      <span class="comment">// Box-Muller transform to generate random numbers with Normal distribution</span></div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;      <span class="keywordtype">double</span> u1 = double(std::rand()) / double(RAND_MAX);</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;      <span class="keywordtype">double</span> u2 = double(std::rand()) / double(RAND_MAX);</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;      <span class="comment">// Compute Gaussian random value</span></div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;      <span class="keywordtype">double</span> rnd = <a class="code" href="namespacecutlass.html#a28f05d94dbdfc97cddbeab3a5d23839d">std::sqrt</a>(-2 * <a class="code" href="namespacecutlass.html#a67f9e83dd59615eff837ea66984c121c">std::log</a>(u1)) * <a class="code" href="namespacecutlass.html#a2337866060023f87d4d821850738541f">std::cos</a>(2 * pi * u2);</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;      rnd = mean + stddev * rnd;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;      <span class="keywordflow">if</span> (int_scale &gt;= 0) {</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        rnd = double(<span class="keywordtype">int</span>(rnd * <span class="keywordtype">double</span>(1 &lt;&lt; int_scale)));</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        reals[i] = from_real&lt;Element&gt;(rnd / double(1 &lt;&lt; int_scale));</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;      }</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;      <span class="keywordflow">else</span> {</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        reals[i] = from_real&lt;Element&gt;(rnd);</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;      }</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    }</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classcutlass_1_1complex.html">complex&lt;Element&gt;</a>(reals[0], reals[1]);</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;  }</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;};</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html">  211</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html">TensorFillGaussianFunc</a> {</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;</div><div class="line"><a name="l00213"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html#a65d2c3c1f2d6fffe8eb4a4a23a914857">  213</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> = <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a>;</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;  <span class="comment">// Data members</span></div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;</div><div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html#a9c559d6186d27c3d343d92830e989832">  219</a></span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html#a9c559d6186d27c3d343d92830e989832">view</a>;</div><div class="line"><a name="l00220"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html#aa6cc9355b27c1d33e351a31bcf4aece7">  220</a></span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html">RandomGaussianFunc&lt;Element&gt;</a> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html#aa6cc9355b27c1d33e351a31bcf4aece7">func</a>;</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;  <span class="comment">// Methods</span></div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;</div><div class="line"><a name="l00227"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html#a4b365f33d4c2d36c2e8052965bc3c787">  227</a></span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html#a4b365f33d4c2d36c2e8052965bc3c787">TensorFillGaussianFunc</a>(</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;    <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> view_ = <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a4a75d3f07143d0a5d98e1d6f3115cfeb">TensorView</a>(),</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;    <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html">RandomGaussianFunc&lt;Element&gt;</a> func_ = <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html">RandomGaussianFunc&lt;Element&gt;</a>()</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;  ):</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    view(view_), func(func_) {</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;  }</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;</div><div class="line"><a name="l00236"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html#a4e447a80bd94cde69fa66f9e9d882b28">  236</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html#a4e447a80bd94cde69fa66f9e9d882b28">operator()</a>(<a class="code" href="structcutlass_1_1Coord.html">Coord&lt;Layout::kRank&gt;</a> <span class="keyword">const</span> &amp;coord)<span class="keyword"> const </span>{</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    view.<a class="code" href="classcutlass_1_1TensorRef.html#a8758907a1c9b1fcd00e7ece626d03b76">at</a>(coord) = func();</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;  }</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;};</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;} <span class="comment">// namespace detail</span></div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00249"></a><span class="lineno"><a class="line" href="namespacecutlass_1_1reference_1_1host.html#a5187d9f07f2b1edebfbad067c7a84826">  249</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a5187d9f07f2b1edebfbad067c7a84826">TensorFillRandomGaussian</a>(</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a> dst,        </div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;  uint64_t seed,                          </div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;  <span class="keywordtype">double</span> mean = 0,                        </div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;  <span class="keywordtype">double</span> stddev = 1,                      </div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;  <span class="keywordtype">int</span> bits = -1) {                        </div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;  </div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html">detail::RandomGaussianFunc&lt;Element&gt;</a> random_func(seed, mean, stddev, bits);</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html">detail::TensorFillGaussianFunc&lt;Element, Layout&gt;</a> func(</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;    dst,</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;    random_func</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;  );</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;  <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a8c798c04df572b34e3ed3976d69f993d">TensorForEach</a>(</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    dst.<a class="code" href="classcutlass_1_1TensorView.html#a7d3914dd5042c9c40be9e21a7b4e9ece">extent</a>(),</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    func</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;  );</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;}</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;  <span class="keyword">typename</span> Element                        </div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;&gt;</div><div class="line"><a name="l00277"></a><span class="lineno"><a class="line" href="namespacecutlass_1_1reference_1_1host.html#a121079d5cb24dd0e0339cee552a854de">  277</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a121079d5cb24dd0e0339cee552a854de">BlockFillRandomGaussian</a>(</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;  Element *ptr,                           </div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;  <span class="keywordtype">size_t</span> capacity,                        </div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;  uint64_t seed,                          </div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;  <span class="keywordtype">double</span> mean = 0,                        </div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;  <span class="keywordtype">double</span> stddev = 1,                      </div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;  <span class="keywordtype">int</span> bits = -1) {                        </div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;  </div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html">detail::RandomGaussianFunc&lt;Element&gt;</a> random_func(seed, mean, stddev, bits);</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; capacity; ++i) {</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    ptr[i] = random_func();</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;  }</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;}</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;<span class="keyword">namespace </span>detail {</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> Element&gt;</div><div class="line"><a name="l00301"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html">  301</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html">RandomUniformFunc</a> {</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;</div><div class="line"><a name="l00303"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#a317b294d017b81224eb1aca2742e8a3c">  303</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#a317b294d017b81224eb1aca2742e8a3c">Real</a> = <span class="keyword">typename</span> <a class="code" href="structcutlass_1_1RealType.html#a1905f6f1044cfbf84f7345699246a6ca">RealType&lt;Element&gt;::Type</a>;</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;  </div><div class="line"><a name="l00305"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#a4cd2d49c1b0042dfa83ead210eec12f7">  305</a></span>&#160;  uint64_t <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#a4cd2d49c1b0042dfa83ead210eec12f7">seed</a>;</div><div class="line"><a name="l00306"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#ab65f9bd7b329d6ce077daf50fb3148f1">  306</a></span>&#160;  <span class="keywordtype">double</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#ab65f9bd7b329d6ce077daf50fb3148f1">range</a>;</div><div class="line"><a name="l00307"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#ab3de08baeb9246f5472a1c8ec19c68fa">  307</a></span>&#160;  <span class="keywordtype">double</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#ab3de08baeb9246f5472a1c8ec19c68fa">min</a>;</div><div class="line"><a name="l00308"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#a9b410cf9a05a34317a83cce730f9a348">  308</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#a9b410cf9a05a34317a83cce730f9a348">int_scale</a>;</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;  <span class="comment">// Methods</span></div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;</div><div class="line"><a name="l00314"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#ac39a320d0975f140d51cf2cd7dd53441">  314</a></span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#ac39a320d0975f140d51cf2cd7dd53441">RandomUniformFunc</a>(</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;    uint64_t seed_ = 0, </div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;    <span class="keywordtype">double</span> <a class="code" href="namespacecutlass_1_1platform.html#af6a9a165e53d7e85ae121d5789aa03e0">max</a> = 1,</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;    <span class="keywordtype">double</span> min_ = 0,</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;    <span class="keywordtype">int</span> int_scale_ = -1</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;  ):</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    seed(seed_), range(<a class="code" href="namespacecutlass_1_1platform.html#af6a9a165e53d7e85ae121d5789aa03e0">max</a> - min_), min(min_), int_scale(int_scale_) {</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;      std::srand((<span class="keywordtype">unsigned</span>)seed);</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;    }</div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;</div><div class="line"><a name="l00326"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#a09db614d063fec17a6a2fbe23389f10a">  326</a></span>&#160;  Element <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#a09db614d063fec17a6a2fbe23389f10a">operator()</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;    <span class="keywordtype">double</span> rnd = double(std::rand()) / double(RAND_MAX);</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;    rnd = min + range * rnd;</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;    <span class="comment">// Random values are cast to integer after scaling by a power of two to facilitate error</span></div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;    <span class="comment">// testing</span></div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;    Element result;</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;    </div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;    <span class="keywordflow">if</span> (int_scale &gt;= 0) {</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;      rnd = double(int64_t(rnd * <span class="keywordtype">double</span>(1 &lt;&lt; int_scale))) / double(1 &lt;&lt; int_scale);</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;      result = <span class="keyword">static_cast&lt;</span>Element<span class="keyword">&gt;</span>(<a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#a317b294d017b81224eb1aca2742e8a3c">Real</a>(rnd));</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;    }</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;    <span class="keywordflow">else</span> {</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;      result = <span class="keyword">static_cast&lt;</span>Element<span class="keyword">&gt;</span>(<a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#a317b294d017b81224eb1aca2742e8a3c">Real</a>(rnd));</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;    }</div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;  }</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;};</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> Element&gt;</div><div class="line"><a name="l00350"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html">  350</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html">RandomUniformFunc</a>&lt;<a class="code" href="classcutlass_1_1complex.html">complex</a>&lt;Element&gt; &gt; {</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;</div><div class="line"><a name="l00352"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#abd7e66b999df7719f6ac77f0a82a0d5d">  352</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#abd7e66b999df7719f6ac77f0a82a0d5d">Real</a> = <span class="keyword">typename</span> <a class="code" href="structcutlass_1_1RealType.html#a1905f6f1044cfbf84f7345699246a6ca">RealType&lt;Element&gt;::Type</a>;</div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;  </div><div class="line"><a name="l00354"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#a8065a5275af20c18429a8f279be98e97">  354</a></span>&#160;  uint64_t <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#a8065a5275af20c18429a8f279be98e97">seed</a>;</div><div class="line"><a name="l00355"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#a17c91db74ff727d9f42442c09d21d0b3">  355</a></span>&#160;  <span class="keywordtype">double</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#a17c91db74ff727d9f42442c09d21d0b3">range</a>;</div><div class="line"><a name="l00356"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#a005299ae9f0e4533f6847a7f6ff9e6ad">  356</a></span>&#160;  <span class="keywordtype">double</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#a005299ae9f0e4533f6847a7f6ff9e6ad">min</a>;</div><div class="line"><a name="l00357"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#ad0de7d4946af855288d7f9cccb9a18eb">  357</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#ad0de7d4946af855288d7f9cccb9a18eb">int_scale</a>;</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;  <span class="comment">// Methods</span></div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;</div><div class="line"><a name="l00363"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#aa894090fefa7f3cc99ec66f5b6e7b7ac">  363</a></span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#aa894090fefa7f3cc99ec66f5b6e7b7ac">RandomUniformFunc</a>(</div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;    uint64_t seed_ = 0, </div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;    <span class="keywordtype">double</span> <a class="code" href="namespacecutlass_1_1platform.html#af6a9a165e53d7e85ae121d5789aa03e0">max</a> = 1,</div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;    <span class="keywordtype">double</span> min_ = 0,</div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;    <span class="keywordtype">int</span> int_scale_ = -1</div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;  ):</div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;    seed(seed_), range(<a class="code" href="namespacecutlass_1_1platform.html#af6a9a165e53d7e85ae121d5789aa03e0">max</a> - min_), min(min_), int_scale(int_scale_) {</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;      std::srand((<span class="keywordtype">unsigned</span>)seed);</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;    }</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;</div><div class="line"><a name="l00375"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#a6ef7020f1108432fe51853dffb7e727c">  375</a></span>&#160;  complex&lt;Element&gt; <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#a6ef7020f1108432fe51853dffb7e727c">operator()</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;    Element reals[2];</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;</div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 2; ++i) {</div><div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;      <span class="keywordtype">double</span> rnd = double(std::rand()) / double(RAND_MAX);</div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;</div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;      rnd = min + range * rnd;</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;      <span class="comment">// Random values are cast to integer after scaling by a power of two to facilitate error</span></div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;      <span class="comment">// testing</span></div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;      </div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;      <span class="keywordflow">if</span> (int_scale &gt;= 0) {</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;        rnd = double(<span class="keywordtype">int</span>(rnd * <span class="keywordtype">double</span>(1 &lt;&lt; int_scale)));</div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;        reals[i] = from_real&lt;Element&gt;(<a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#abd7e66b999df7719f6ac77f0a82a0d5d">Real</a>(rnd / <span class="keywordtype">double</span>(1 &lt;&lt; int_scale)));</div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;      }</div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;      <span class="keywordflow">else</span> {</div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;        reals[i] = from_real&lt;Element&gt;(<a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#abd7e66b999df7719f6ac77f0a82a0d5d">Real</a>(rnd));</div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;      }</div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;    }</div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;</div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;    <span class="keywordflow">return</span> complex&lt;Element&gt;(reals[0], reals[1]);</div><div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;  }</div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;};</div><div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;</div><div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00404"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html">  404</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html">TensorFillRandomUniformFunc</a> {</div><div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;</div><div class="line"><a name="l00406"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html#a8e2b5c338215d856260ff389338d1722">  406</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> = <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a>;</div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;</div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;  <span class="comment">// Data members</span></div><div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;</div><div class="line"><a name="l00412"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html#a92cd583574fa8f7c4b19aea08b380476">  412</a></span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html#a92cd583574fa8f7c4b19aea08b380476">view</a>;</div><div class="line"><a name="l00413"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html#a9272276afdeec7284dfcc6605f153c97">  413</a></span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html">RandomUniformFunc&lt;Element&gt;</a> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html#a9272276afdeec7284dfcc6605f153c97">func</a>;</div><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;</div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;  <span class="comment">// Methods</span></div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;</div><div class="line"><a name="l00420"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html#aa192b9b11c26dff5b0279fff30e3731c">  420</a></span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html#aa192b9b11c26dff5b0279fff30e3731c">TensorFillRandomUniformFunc</a>(</div><div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;    <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> view_ = <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a4a75d3f07143d0a5d98e1d6f3115cfeb">TensorView</a>(),</div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;    <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html">RandomUniformFunc&lt;Element&gt;</a> func_ = <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html">RandomUniformFunc&lt;Element&gt;</a>()</div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;  ):</div><div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;    view(view_), func(func_) {</div><div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;</div><div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;  }</div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;</div><div class="line"><a name="l00429"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html#a9841b5a0391cd0dc747f5a30660ea7d9">  429</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html#a9841b5a0391cd0dc747f5a30660ea7d9">operator()</a>(<a class="code" href="structcutlass_1_1Coord.html">Coord&lt;Layout::kRank&gt;</a> <span class="keyword">const</span> &amp;coord)<span class="keyword"> const </span>{</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;</div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;    view.<a class="code" href="classcutlass_1_1TensorRef.html#a8758907a1c9b1fcd00e7ece626d03b76">at</a>(coord) = func();</div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;  }</div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;};</div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;</div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;} <span class="comment">// namespace detail</span></div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;</div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;</div><div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00443"></a><span class="lineno"><a class="line" href="namespacecutlass_1_1reference_1_1host.html#a8f1500a3e2cb694323bf9d25bafc0fbc">  443</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a8f1500a3e2cb694323bf9d25bafc0fbc">TensorFillRandomUniform</a>(</div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a> dst,        </div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;  uint64_t seed,                          </div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;  <span class="keywordtype">double</span> <a class="code" href="namespacecutlass_1_1platform.html#af6a9a165e53d7e85ae121d5789aa03e0">max</a> = 1,                         </div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;  <span class="keywordtype">double</span> <a class="code" href="namespacecutlass_1_1platform.html#a57c071d2a7305dd4ec60542e66b0c81c">min</a> = 0,                         </div><div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;  <span class="keywordtype">int</span> bits = -1) {                        </div><div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html">detail::RandomUniformFunc&lt;Element&gt;</a> random_func(seed, <a class="code" href="namespacecutlass_1_1platform.html#af6a9a165e53d7e85ae121d5789aa03e0">max</a>, <a class="code" href="namespacecutlass_1_1platform.html#a57c071d2a7305dd4ec60542e66b0c81c">min</a>, bits);</div><div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;</div><div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html">detail::TensorFillRandomUniformFunc&lt;Element, Layout&gt;</a> func(</div><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;    dst,</div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;    random_func</div><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;  );</div><div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;</div><div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;  <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a8c798c04df572b34e3ed3976d69f993d">TensorForEach</a>(</div><div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;    dst.<a class="code" href="classcutlass_1_1TensorView.html#a7d3914dd5042c9c40be9e21a7b4e9ece">extent</a>(),</div><div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;    func</div><div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;  );</div><div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;}</div><div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;</div><div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;</div><div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;  <span class="keyword">typename</span> Element                        </div><div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;&gt;</div><div class="line"><a name="l00470"></a><span class="lineno"><a class="line" href="namespacecutlass_1_1reference_1_1host.html#a417152b59865d2ef6995ee2398bcea8d">  470</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a417152b59865d2ef6995ee2398bcea8d">BlockFillRandomUniform</a>(</div><div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;  Element *ptr,</div><div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;  <span class="keywordtype">size_t</span> capacity,</div><div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;  uint64_t seed,                          </div><div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;  <span class="keywordtype">double</span> <a class="code" href="namespacecutlass_1_1platform.html#af6a9a165e53d7e85ae121d5789aa03e0">max</a> = 1,                         </div><div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;  <span class="keywordtype">double</span> <a class="code" href="namespacecutlass_1_1platform.html#a57c071d2a7305dd4ec60542e66b0c81c">min</a> = 0,                         </div><div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;  <span class="keywordtype">int</span> bits = -1) {                        </div><div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html">detail::RandomUniformFunc&lt;Element&gt;</a> random_func(seed, <a class="code" href="namespacecutlass_1_1platform.html#af6a9a165e53d7e85ae121d5789aa03e0">max</a>, <a class="code" href="namespacecutlass_1_1platform.html#a57c071d2a7305dd4ec60542e66b0c81c">min</a>, bits);</div><div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;</div><div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; capacity; ++i) {</div><div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;    ptr[i] = random_func();</div><div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;  }</div><div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;}</div><div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;</div><div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;</div><div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;<span class="keyword">namespace </span>detail {</div><div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;</div><div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00494"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html">  494</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html">TensorFillDiagonalFunc</a> {</div><div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;</div><div class="line"><a name="l00496"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html#a0a551f530a56a74b955b53c6ede04635">  496</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> = <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a>;</div><div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;</div><div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;  <span class="comment">// Data members</span></div><div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;</div><div class="line"><a name="l00502"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html#a6f88183d1f98e77cc1225efa92be128b">  502</a></span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html#a6f88183d1f98e77cc1225efa92be128b">view</a>;</div><div class="line"><a name="l00503"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html#a027d9ae77e068454e8df798018276c18">  503</a></span>&#160;  Element <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html#a027d9ae77e068454e8df798018276c18">diag</a>;</div><div class="line"><a name="l00504"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html#ab5fdecc2fd8df736bf4efe884a8e873e">  504</a></span>&#160;  Element <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html#ab5fdecc2fd8df736bf4efe884a8e873e">other</a>;</div><div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;</div><div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;  <span class="comment">// Methods</span></div><div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;</div><div class="line"><a name="l00510"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html#ac288b85512ed45e0180987bf5b85dd23">  510</a></span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html#ac288b85512ed45e0180987bf5b85dd23">TensorFillDiagonalFunc</a>(</div><div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;    <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> <span class="keyword">const</span> &amp;view_ = <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a4a75d3f07143d0a5d98e1d6f3115cfeb">TensorView</a>(),</div><div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;    Element diag_ = Element(1),</div><div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;    Element other_ = Element(0)</div><div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;  ):</div><div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;    view(view_), diag(diag_), other(other_) { }</div><div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;</div><div class="line"><a name="l00517"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html#aa4b7ce383219da51d8021a4c27b3a57b">  517</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html#aa4b7ce383219da51d8021a4c27b3a57b">operator()</a>(<a class="code" href="structcutlass_1_1Coord.html">Coord&lt;Layout::kRank&gt;</a> <span class="keyword">const</span> &amp; coord)<span class="keyword"> const </span>{</div><div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;    <span class="keywordtype">bool</span> is_diag = <span class="keyword">true</span>;</div><div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;    </div><div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;    <a class="code" href="cutlass_8h.html#a4b1c9f25ab6eaa25e1f2258dd63e6ce4">CUTLASS_PRAGMA_UNROLL</a></div><div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt; Layout::kRank; ++i) {</div><div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;      <span class="keywordflow">if</span> (coord[i] != coord[i - 1]) {</div><div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;        is_diag = <span class="keyword">false</span>;</div><div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;      }</div><div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;    }</div><div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;</div><div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;    view.<a class="code" href="classcutlass_1_1TensorRef.html#a8758907a1c9b1fcd00e7ece626d03b76">at</a>(coord) = (is_diag ? diag : other);</div><div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;  }</div><div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;};</div><div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;</div><div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;} <span class="comment">// namespace detail</span></div><div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;</div><div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;</div><div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00540"></a><span class="lineno"><a class="line" href="namespacecutlass_1_1reference_1_1host.html#a1c81144ca36832a48d04d1b5b6498080">  540</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a1c81144ca36832a48d04d1b5b6498080">TensorFillDiagonal</a>(</div><div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a> dst,        </div><div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;  Element diag = Element(1),              </div><div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;  Element other = Element(0)) {           </div><div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;</div><div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html">detail::TensorFillDiagonalFunc&lt;Element, Layout&gt;</a> func(</div><div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;    dst,</div><div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;    diag,</div><div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;    other</div><div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;  );</div><div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;</div><div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;  <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a8c798c04df572b34e3ed3976d69f993d">TensorForEach</a>(</div><div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160;    dst.<a class="code" href="classcutlass_1_1TensorView.html#a7d3914dd5042c9c40be9e21a7b4e9ece">extent</a>(),</div><div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;    func</div><div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;  );</div><div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;}</div><div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;</div><div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;</div><div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00564"></a><span class="lineno"><a class="line" href="namespacecutlass_1_1reference_1_1host.html#a29548cb522d9c147cf34263ecac75d89">  564</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a29548cb522d9c147cf34263ecac75d89">TensorFillIdentity</a>(</div><div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a> dst) {               </div><div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;</div><div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;  <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a1c81144ca36832a48d04d1b5b6498080">TensorFillDiagonal</a>(dst, Element(1), Element(0));</div><div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;}</div><div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;</div><div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;</div><div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00577"></a><span class="lineno"><a class="line" href="namespacecutlass_1_1reference_1_1host.html#acbf747241e8ac6ef9b1702b735a7913e">  577</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecutlass_1_1reference_1_1host.html#acbf747241e8ac6ef9b1702b735a7913e">TensorUpdateDiagonal</a>(</div><div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a> dst,                 </div><div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;  Element val = Element(1)) {</div><div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;</div><div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;  <span class="keyword">typename</span> Layout::Index extent = dst.<a class="code" href="classcutlass_1_1TensorView.html#a7d3914dd5042c9c40be9e21a7b4e9ece">extent</a>().min();</div><div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;</div><div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">typename</span> Layout::Index i = 0; i &lt; extent; ++i) {</div><div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;    <a class="code" href="structcutlass_1_1Coord.html">Coord&lt;Layout::kRank&gt;</a> coord(i);</div><div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;    dst.<a class="code" href="classcutlass_1_1TensorRef.html#a8758907a1c9b1fcd00e7ece626d03b76">at</a>(coord) = val;</div><div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;  }</div><div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;}</div><div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;</div><div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;</div><div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;<span class="keyword">namespace </span>detail {</div><div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;</div><div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00597"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html">  597</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html">TensorUpdateOffDiagonalFunc</a> {</div><div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;</div><div class="line"><a name="l00599"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html#a3b3f634de2385fe50d8448199f522af2">  599</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> = <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a>;</div><div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;</div><div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;  <span class="comment">// Data members</span></div><div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;</div><div class="line"><a name="l00605"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html#a11580631bdb3106d4edd768a76f6ca6f">  605</a></span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html#a11580631bdb3106d4edd768a76f6ca6f">view</a>;</div><div class="line"><a name="l00606"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html#a05cc631b27ee842d78b48a4a1a16b943">  606</a></span>&#160;  Element <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html#a05cc631b27ee842d78b48a4a1a16b943">other</a>;</div><div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;</div><div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160;  <span class="comment">// Methods</span></div><div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00611"></a><span class="lineno">  611</span>&#160;</div><div class="line"><a name="l00612"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html#a65a5f9c6873bea8c693b4b88087cba17">  612</a></span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html#a65a5f9c6873bea8c693b4b88087cba17">TensorUpdateOffDiagonalFunc</a>(</div><div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;    <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> <span class="keyword">const</span> &amp;view_ = <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a4a75d3f07143d0a5d98e1d6f3115cfeb">TensorView</a>(),</div><div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;    Element other_ = Element(0)</div><div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;  ):</div><div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;    view(view_), other(other_) { }</div><div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;</div><div class="line"><a name="l00618"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html#a4b610b1ca5801a747afb4a2c5ad0fadd">  618</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html#a4b610b1ca5801a747afb4a2c5ad0fadd">operator()</a>(<a class="code" href="structcutlass_1_1Coord.html">Coord&lt;Layout::kRank&gt;</a> <span class="keyword">const</span> &amp; coord)<span class="keyword"> const </span>{</div><div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;    <span class="keywordtype">bool</span> is_diag = <span class="keyword">true</span>;</div><div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;    </div><div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160;    <a class="code" href="cutlass_8h.html#a4b1c9f25ab6eaa25e1f2258dd63e6ce4">CUTLASS_PRAGMA_UNROLL</a></div><div class="line"><a name="l00622"></a><span class="lineno">  622</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt; Layout::kRank; ++i) {</div><div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;      <span class="keywordflow">if</span> (coord[i] != coord[i - 1]) {</div><div class="line"><a name="l00624"></a><span class="lineno">  624</span>&#160;        is_diag = <span class="keyword">false</span>;</div><div class="line"><a name="l00625"></a><span class="lineno">  625</span>&#160;        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00626"></a><span class="lineno">  626</span>&#160;      }</div><div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;    }</div><div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;</div><div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;    <span class="keywordflow">if</span> (!is_diag) {</div><div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;      view.<a class="code" href="classcutlass_1_1TensorRef.html#a8758907a1c9b1fcd00e7ece626d03b76">at</a>(coord) = other;</div><div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;    }</div><div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;  }</div><div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;};</div><div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;</div><div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;} <span class="comment">// namespace detail</span></div><div class="line"><a name="l00636"></a><span class="lineno">  636</span>&#160;</div><div class="line"><a name="l00638"></a><span class="lineno">  638</span>&#160;</div><div class="line"><a name="l00640"></a><span class="lineno">  640</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00641"></a><span class="lineno">  641</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00642"></a><span class="lineno">  642</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00643"></a><span class="lineno"><a class="line" href="namespacecutlass_1_1reference_1_1host.html#a6d146dc0390e4c045f08b5d2adfcf48a">  643</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a6d146dc0390e4c045f08b5d2adfcf48a">TensorUpdateOffDiagonal</a>(</div><div class="line"><a name="l00644"></a><span class="lineno">  644</span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a> dst,      </div><div class="line"><a name="l00645"></a><span class="lineno">  645</span>&#160;  Element other = Element(1)) {</div><div class="line"><a name="l00646"></a><span class="lineno">  646</span>&#160;</div><div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html">detail::TensorUpdateOffDiagonalFunc&lt;Element, Layout&gt;</a> func(</div><div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160;    dst,</div><div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160;    other</div><div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;  );</div><div class="line"><a name="l00651"></a><span class="lineno">  651</span>&#160;</div><div class="line"><a name="l00652"></a><span class="lineno">  652</span>&#160;  <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a8c798c04df572b34e3ed3976d69f993d">TensorForEach</a>(</div><div class="line"><a name="l00653"></a><span class="lineno">  653</span>&#160;    dst.<a class="code" href="classcutlass_1_1TensorView.html#a7d3914dd5042c9c40be9e21a7b4e9ece">extent</a>(),</div><div class="line"><a name="l00654"></a><span class="lineno">  654</span>&#160;    func</div><div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;  );</div><div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160;}</div><div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;</div><div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;</div><div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;</div><div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160;<span class="keyword">namespace </span>detail {</div><div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;</div><div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00667"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html">  667</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html">TensorFillLinearFunc</a> {</div><div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;</div><div class="line"><a name="l00669"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#a4049f14cdcfa90f02993f00922f39c79">  669</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> = <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a>;</div><div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;</div><div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;  <span class="comment">// Data members</span></div><div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;</div><div class="line"><a name="l00675"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#aabd6c175d26c7c370aa7f67034e9c323">  675</a></span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#aabd6c175d26c7c370aa7f67034e9c323">view</a>;</div><div class="line"><a name="l00676"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#aa47ca9b4e4187f4eee4f332b6cd855bb">  676</a></span>&#160;  Array&lt;Element, Layout::kRank&gt; <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#aa47ca9b4e4187f4eee4f332b6cd855bb">v</a>;</div><div class="line"><a name="l00677"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#a83ca72169299439a087871b794750c38">  677</a></span>&#160;  Element <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#a83ca72169299439a087871b794750c38">s</a>;</div><div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;</div><div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;  <span class="comment">// Methods</span></div><div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00682"></a><span class="lineno">  682</span>&#160;  </div><div class="line"><a name="l00683"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#a7b3f05b29657f968969b15bd6af4b4c1">  683</a></span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#a7b3f05b29657f968969b15bd6af4b4c1">TensorFillLinearFunc</a>() { }</div><div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160;</div><div class="line"><a name="l00686"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#aac8469e704c75d37224294fef6bc8983">  686</a></span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#aac8469e704c75d37224294fef6bc8983">TensorFillLinearFunc</a>(</div><div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;    <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> <span class="keyword">const</span> &amp;view_,</div><div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;    Array&lt;Element, Layout::kRank&gt; <span class="keyword">const</span> &amp; v_,</div><div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;    Element s_ = Element(0)</div><div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;  ):</div><div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;    view(view_), v(v_), s(s_) { }</div><div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;</div><div class="line"><a name="l00694"></a><span class="lineno"><a class="line" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#a660184169f203d2499799692b136d589">  694</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#a660184169f203d2499799692b136d589">operator()</a>(<a class="code" href="structcutlass_1_1Coord.html">Coord&lt;Layout::kRank&gt;</a> <span class="keyword">const</span> &amp; coord)<span class="keyword"> const </span>{</div><div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160;    </div><div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160;    Element sum(s);</div><div class="line"><a name="l00697"></a><span class="lineno">  697</span>&#160;</div><div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;    <a class="code" href="cutlass_8h.html#a4b1c9f25ab6eaa25e1f2258dd63e6ce4">CUTLASS_PRAGMA_UNROLL</a></div><div class="line"><a name="l00699"></a><span class="lineno">  699</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; Layout::kRank; ++i) {</div><div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;      sum += Element(coord[i]) * v[i];</div><div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;    }</div><div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;</div><div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;    view.<a class="code" href="classcutlass_1_1TensorRef.html#a8758907a1c9b1fcd00e7ece626d03b76">at</a>(coord) = sum;</div><div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;  }</div><div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;};</div><div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;</div><div class="line"><a name="l00707"></a><span class="lineno">  707</span>&#160;} <span class="comment">// namespace detail</span></div><div class="line"><a name="l00708"></a><span class="lineno">  708</span>&#160;</div><div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;</div><div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00715"></a><span class="lineno"><a class="line" href="namespacecutlass_1_1reference_1_1host.html#ac23a650217ddd1640807c2e91e69ab91">  715</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecutlass_1_1reference_1_1host.html#ac23a650217ddd1640807c2e91e69ab91">TensorFillLinear</a>(</div><div class="line"><a name="l00716"></a><span class="lineno">  716</span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a> dst,      </div><div class="line"><a name="l00717"></a><span class="lineno">  717</span>&#160;  Array&lt;Element, Layout::kRank&gt; <span class="keyword">const</span> &amp; v,</div><div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160;  Element s = Element(0)) {</div><div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;</div><div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160;  <a class="code" href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html">detail::TensorFillLinearFunc&lt;Element, Layout&gt;</a> func(</div><div class="line"><a name="l00721"></a><span class="lineno">  721</span>&#160;    dst,</div><div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;    v,</div><div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;    s</div><div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;  );</div><div class="line"><a name="l00725"></a><span class="lineno">  725</span>&#160;</div><div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;  <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a8c798c04df572b34e3ed3976d69f993d">TensorForEach</a>(</div><div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;    dst.<a class="code" href="classcutlass_1_1TensorView.html#a7d3914dd5042c9c40be9e21a7b4e9ece">extent</a>(),</div><div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160;    func</div><div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;  );</div><div class="line"><a name="l00730"></a><span class="lineno">  730</span>&#160;}</div><div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;</div><div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;</div><div class="line"><a name="l00735"></a><span class="lineno">  735</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00738"></a><span class="lineno"><a class="line" href="namespacecutlass_1_1reference_1_1host.html#ad6e2cd99b8096eaaf79c0a6edbd3e420">  738</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecutlass_1_1reference_1_1host.html#ad6e2cd99b8096eaaf79c0a6edbd3e420">TensorFillSequential</a>(</div><div class="line"><a name="l00739"></a><span class="lineno">  739</span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a> dst,     </div><div class="line"><a name="l00740"></a><span class="lineno">  740</span>&#160;  Element s = Element(0)) {</div><div class="line"><a name="l00741"></a><span class="lineno">  741</span>&#160;</div><div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;  Array&lt;Element, Layout::kRank&gt; stride;</div><div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160;</div><div class="line"><a name="l00744"></a><span class="lineno">  744</span>&#160;  stride[0] = Element(1);</div><div class="line"><a name="l00745"></a><span class="lineno">  745</span>&#160;</div><div class="line"><a name="l00746"></a><span class="lineno">  746</span>&#160;  <a class="code" href="cutlass_8h.html#a4b1c9f25ab6eaa25e1f2258dd63e6ce4">CUTLASS_PRAGMA_UNROLL</a></div><div class="line"><a name="l00747"></a><span class="lineno">  747</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt; Layout::kRank; ++i) {</div><div class="line"><a name="l00748"></a><span class="lineno">  748</span>&#160;    stride[i] = stride[i - 1] * Element(dst.<a class="code" href="classcutlass_1_1TensorView.html#a7d3914dd5042c9c40be9e21a7b4e9ece">extent</a>()[i - 1]);</div><div class="line"><a name="l00749"></a><span class="lineno">  749</span>&#160;  }</div><div class="line"><a name="l00750"></a><span class="lineno">  750</span>&#160;</div><div class="line"><a name="l00751"></a><span class="lineno">  751</span>&#160;  <a class="code" href="namespacecutlass_1_1reference_1_1host.html#ac23a650217ddd1640807c2e91e69ab91">TensorFillLinear</a>(dst, stride, s);</div><div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;}</div><div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;</div><div class="line"><a name="l00756"></a><span class="lineno">  756</span>&#160;</div><div class="line"><a name="l00758"></a><span class="lineno">  758</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00759"></a><span class="lineno">  759</span>&#160;  <span class="keyword">typename</span> Element</div><div class="line"><a name="l00760"></a><span class="lineno">  760</span>&#160;&gt;</div><div class="line"><a name="l00761"></a><span class="lineno"><a class="line" href="namespacecutlass_1_1reference_1_1host.html#a1808624141976837e298340c9f6c0f6b">  761</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a1808624141976837e298340c9f6c0f6b">BlockFillSequential</a>(</div><div class="line"><a name="l00762"></a><span class="lineno">  762</span>&#160;  Element *ptr,</div><div class="line"><a name="l00763"></a><span class="lineno">  763</span>&#160;  int64_t capacity,</div><div class="line"><a name="l00764"></a><span class="lineno">  764</span>&#160;  Element v = Element(1),</div><div class="line"><a name="l00765"></a><span class="lineno">  765</span>&#160;  Element s = Element(0)) {</div><div class="line"><a name="l00766"></a><span class="lineno">  766</span>&#160;  <span class="keywordtype">int</span> i = 0;</div><div class="line"><a name="l00767"></a><span class="lineno">  767</span>&#160;</div><div class="line"><a name="l00768"></a><span class="lineno">  768</span>&#160;  <span class="keywordflow">while</span> (i &lt; capacity) {</div><div class="line"><a name="l00769"></a><span class="lineno">  769</span>&#160;    <a class="code" href="structcutlass_1_1ReferenceFactory.html">cutlass::ReferenceFactory&lt;Element, (cutlass::sizeof_bits&lt;Element&gt;::value</a> &lt;</div><div class="line"><a name="l00770"></a><span class="lineno">  770</span>&#160;                                        8)&gt;::<span class="keyword">get</span>(ptr, i) = s;</div><div class="line"><a name="l00771"></a><span class="lineno">  771</span>&#160;</div><div class="line"><a name="l00772"></a><span class="lineno">  772</span>&#160;    s = Element(s + v);</div><div class="line"><a name="l00773"></a><span class="lineno">  773</span>&#160;    ++i;</div><div class="line"><a name="l00774"></a><span class="lineno">  774</span>&#160;  }</div><div class="line"><a name="l00775"></a><span class="lineno">  775</span>&#160;}</div><div class="line"><a name="l00776"></a><span class="lineno">  776</span>&#160;</div><div class="line"><a name="l00779"></a><span class="lineno">  779</span>&#160;</div><div class="line"><a name="l00781"></a><span class="lineno">  781</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00782"></a><span class="lineno">  782</span>&#160;  <span class="keyword">typename</span> Element</div><div class="line"><a name="l00783"></a><span class="lineno">  783</span>&#160;&gt;</div><div class="line"><a name="l00784"></a><span class="lineno"><a class="line" href="namespacecutlass_1_1reference_1_1host.html#ae6171d78c959aefff277cec4cad8fdb3">  784</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecutlass_1_1reference_1_1host.html#ae6171d78c959aefff277cec4cad8fdb3">BlockFillRandom</a>(</div><div class="line"><a name="l00785"></a><span class="lineno">  785</span>&#160;  Element *ptr,</div><div class="line"><a name="l00786"></a><span class="lineno">  786</span>&#160;  <span class="keywordtype">size_t</span> capacity,</div><div class="line"><a name="l00787"></a><span class="lineno">  787</span>&#160;  uint64_t seed,</div><div class="line"><a name="l00788"></a><span class="lineno">  788</span>&#160;  <a class="code" href="structcutlass_1_1Distribution.html">Distribution</a> dist) {</div><div class="line"><a name="l00789"></a><span class="lineno">  789</span>&#160;</div><div class="line"><a name="l00790"></a><span class="lineno">  790</span>&#160;  <span class="keywordflow">if</span> (dist.<a class="code" href="structcutlass_1_1Distribution.html#a07cb089b346ef06e198f6043128264fb">kind</a> == <a class="code" href="structcutlass_1_1Distribution.html#a499f4023e0d42356ce71d38cc32bf92aa39890d8be86d514207259b1b5dca3ed5">Distribution::Gaussian</a>) {</div><div class="line"><a name="l00791"></a><span class="lineno">  791</span>&#160;    BlockFillRandomGaussian&lt;Element&gt;(</div><div class="line"><a name="l00792"></a><span class="lineno">  792</span>&#160;      ptr, </div><div class="line"><a name="l00793"></a><span class="lineno">  793</span>&#160;      capacity, </div><div class="line"><a name="l00794"></a><span class="lineno">  794</span>&#160;      seed, </div><div class="line"><a name="l00795"></a><span class="lineno">  795</span>&#160;      dist.<a class="code" href="structcutlass_1_1Distribution.html#ada9c50671b405fabbb0841a093f809de">gaussian</a>.mean, </div><div class="line"><a name="l00796"></a><span class="lineno">  796</span>&#160;      dist.<a class="code" href="structcutlass_1_1Distribution.html#ada9c50671b405fabbb0841a093f809de">gaussian</a>.stddev, </div><div class="line"><a name="l00797"></a><span class="lineno">  797</span>&#160;      dist.<a class="code" href="structcutlass_1_1Distribution.html#a676b1d8b87691b4218f6ed308e6adfc1">int_scale</a>);</div><div class="line"><a name="l00798"></a><span class="lineno">  798</span>&#160;  }</div><div class="line"><a name="l00799"></a><span class="lineno">  799</span>&#160;  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dist.<a class="code" href="structcutlass_1_1Distribution.html#a07cb089b346ef06e198f6043128264fb">kind</a> == <a class="code" href="structcutlass_1_1Distribution.html#a499f4023e0d42356ce71d38cc32bf92aa0fad91cf4fcbc8ab015053bea77090a6">Distribution::Uniform</a>) {</div><div class="line"><a name="l00800"></a><span class="lineno">  800</span>&#160;    BlockFillRandomUniform&lt;Element&gt;(</div><div class="line"><a name="l00801"></a><span class="lineno">  801</span>&#160;      ptr, </div><div class="line"><a name="l00802"></a><span class="lineno">  802</span>&#160;      capacity, </div><div class="line"><a name="l00803"></a><span class="lineno">  803</span>&#160;      seed, </div><div class="line"><a name="l00804"></a><span class="lineno">  804</span>&#160;      dist.<a class="code" href="structcutlass_1_1Distribution.html#afc30b6976acb39e54f061af1bf2870db">uniform</a>.max,</div><div class="line"><a name="l00805"></a><span class="lineno">  805</span>&#160;      dist.<a class="code" href="structcutlass_1_1Distribution.html#afc30b6976acb39e54f061af1bf2870db">uniform</a>.min, </div><div class="line"><a name="l00806"></a><span class="lineno">  806</span>&#160;      dist.<a class="code" href="structcutlass_1_1Distribution.html#a676b1d8b87691b4218f6ed308e6adfc1">int_scale</a>);</div><div class="line"><a name="l00807"></a><span class="lineno">  807</span>&#160;  }</div><div class="line"><a name="l00808"></a><span class="lineno">  808</span>&#160;}</div><div class="line"><a name="l00809"></a><span class="lineno">  809</span>&#160;</div><div class="line"><a name="l00812"></a><span class="lineno">  812</span>&#160;</div><div class="line"><a name="l00814"></a><span class="lineno">  814</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00815"></a><span class="lineno">  815</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00816"></a><span class="lineno">  816</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00817"></a><span class="lineno"><a class="line" href="namespacecutlass_1_1reference_1_1host.html#a224f376c3199603bde4ededa4357eea3">  817</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a224f376c3199603bde4ededa4357eea3">TensorCopyDiagonalIn</a>(</div><div class="line"><a name="l00818"></a><span class="lineno">  818</span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a> dst,          </div><div class="line"><a name="l00819"></a><span class="lineno">  819</span>&#160;  Element <span class="keyword">const</span> *ptr) {                     </div><div class="line"><a name="l00820"></a><span class="lineno">  820</span>&#160;</div><div class="line"><a name="l00821"></a><span class="lineno">  821</span>&#160;  <span class="keyword">typename</span> Layout::Index extent = dst.<a class="code" href="classcutlass_1_1TensorView.html#a7d3914dd5042c9c40be9e21a7b4e9ece">extent</a>().min();</div><div class="line"><a name="l00822"></a><span class="lineno">  822</span>&#160;  </div><div class="line"><a name="l00823"></a><span class="lineno">  823</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">typename</span> Layout::Index i = 0; i &lt; extent; ++i) {</div><div class="line"><a name="l00824"></a><span class="lineno">  824</span>&#160;    <a class="code" href="structcutlass_1_1Coord.html">Coord&lt;Layout::kRank&gt;</a> coord(i);</div><div class="line"><a name="l00825"></a><span class="lineno">  825</span>&#160;    dst.<a class="code" href="classcutlass_1_1TensorRef.html#a8758907a1c9b1fcd00e7ece626d03b76">at</a>(coord) = ptr[i];</div><div class="line"><a name="l00826"></a><span class="lineno">  826</span>&#160;  }</div><div class="line"><a name="l00827"></a><span class="lineno">  827</span>&#160;}</div><div class="line"><a name="l00828"></a><span class="lineno">  828</span>&#160;</div><div class="line"><a name="l00831"></a><span class="lineno">  831</span>&#160;</div><div class="line"><a name="l00833"></a><span class="lineno">  833</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00834"></a><span class="lineno">  834</span>&#160;  <span class="keyword">typename</span> Element,               </div><div class="line"><a name="l00835"></a><span class="lineno">  835</span>&#160;  <span class="keyword">typename</span> Layout&gt;                </div><div class="line"><a name="l00836"></a><span class="lineno"><a class="line" href="namespacecutlass_1_1reference_1_1host.html#a63f6629dd3aabb499ba430d84cb98e05">  836</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecutlass_1_1reference_1_1host.html#a63f6629dd3aabb499ba430d84cb98e05">TensorCopyDiagonalOut</a>(</div><div class="line"><a name="l00837"></a><span class="lineno">  837</span>&#160;  Element *ptr,                               </div><div class="line"><a name="l00838"></a><span class="lineno">  838</span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a> src) {          </div><div class="line"><a name="l00839"></a><span class="lineno">  839</span>&#160;</div><div class="line"><a name="l00840"></a><span class="lineno">  840</span>&#160;  <span class="keyword">typename</span> Layout::Index extent = src.<a class="code" href="classcutlass_1_1TensorView.html#a7d3914dd5042c9c40be9e21a7b4e9ece">extent</a>().min();</div><div class="line"><a name="l00841"></a><span class="lineno">  841</span>&#160;  </div><div class="line"><a name="l00842"></a><span class="lineno">  842</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">typename</span> Layout::Index i = 0; i &lt; extent; ++i) {</div><div class="line"><a name="l00843"></a><span class="lineno">  843</span>&#160;    <a class="code" href="structcutlass_1_1Coord.html">Coord&lt;Layout::kRank&gt;</a> coord(i);</div><div class="line"><a name="l00844"></a><span class="lineno">  844</span>&#160;    ptr[i] = src.<a class="code" href="classcutlass_1_1TensorRef.html#a8758907a1c9b1fcd00e7ece626d03b76">at</a>(coord);</div><div class="line"><a name="l00845"></a><span class="lineno">  845</span>&#160;  }</div><div class="line"><a name="l00846"></a><span class="lineno">  846</span>&#160;}</div><div class="line"><a name="l00847"></a><span class="lineno">  847</span>&#160;</div><div class="line"><a name="l00850"></a><span class="lineno">  850</span>&#160;</div><div class="line"><a name="l00851"></a><span class="lineno">  851</span>&#160;} <span class="comment">// namespace host</span></div><div class="line"><a name="l00852"></a><span class="lineno">  852</span>&#160;} <span class="comment">// namespace reference</span></div><div class="line"><a name="l00853"></a><span class="lineno">  853</span>&#160;} <span class="comment">// namespace cutlass</span></div><div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_html_a0d83ee32fde2512db11ed9b5f7ae1534"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a0d83ee32fde2512db11ed9b5f7ae1534">cutlass::reference::host::detail::RandomGaussianFunc::seed</a></div><div class="ttdeci">uint64_t seed</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:112</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc_html_a9841b5a0391cd0dc747f5a30660ea7d9"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html#a9841b5a0391cd0dc747f5a30660ea7d9">cutlass::reference::host::detail::TensorFillRandomUniformFunc::operator()</a></div><div class="ttdeci">void operator()(Coord&lt; Layout::kRank &gt; const &amp;coord) const </div><div class="ttdoc">Compute random value and update RNG state. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:429</div></div>
<div class="ttc" id="namespacecutlass_html_a2337866060023f87d4d821850738541f"><div class="ttname"><a href="namespacecutlass.html#a2337866060023f87d4d821850738541f">cutlass::cos</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE complex&lt; T &gt; cos(complex&lt; T &gt; const &amp;z)</div><div class="ttdoc">Computes the cosine of complex z. </div><div class="ttdef"><b>Definition:</b> complex.h:401</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4_html_a005299ae9f0e4533f6847a7f6ff9e6ad"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#a005299ae9f0e4533f6847a7f6ff9e6ad">cutlass::reference::host::detail::RandomUniformFunc&lt; complex&lt; Element &gt; &gt;::min</a></div><div class="ttdeci">double min</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:356</div></div>
<div class="ttc" id="namespacecutlass_1_1platform_html_af6a9a165e53d7e85ae121d5789aa03e0"><div class="ttname"><a href="namespacecutlass_1_1platform.html#af6a9a165e53d7e85ae121d5789aa03e0">cutlass::platform::max</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE constexpr const T &amp; max(const T &amp;a, const T &amp;b)</div><div class="ttdoc">std::max </div><div class="ttdef"><b>Definition:</b> platform.h:189</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_html_a317b294d017b81224eb1aca2742e8a3c"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#a317b294d017b81224eb1aca2742e8a3c">cutlass::reference::host::detail::RandomUniformFunc::Real</a></div><div class="ttdeci">typename RealType&lt; Element &gt;::Type Real</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:303</div></div>
<div class="ttc" id="namespacecutlass_1_1reference_1_1host_html_a63f6629dd3aabb499ba430d84cb98e05"><div class="ttname"><a href="namespacecutlass_1_1reference_1_1host.html#a63f6629dd3aabb499ba430d84cb98e05">cutlass::reference::host::TensorCopyDiagonalOut</a></div><div class="ttdeci">void TensorCopyDiagonalOut(Element *ptr, TensorView&lt; Element, Layout &gt; src)</div><div class="ttdoc">Copies the diagonal of a tensor into a dense buffer in host memory. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:836</div></div>
<div class="ttc" id="namespacecutlass_html"><div class="ttname"><a href="namespacecutlass.html">cutlass</a></div><div class="ttdef"><b>Definition:</b> aligned_buffer.h:35</div></div>
<div class="ttc" id="structcutlass_1_1Distribution_html_a499f4023e0d42356ce71d38cc32bf92aa0fad91cf4fcbc8ab015053bea77090a6"><div class="ttname"><a href="structcutlass_1_1Distribution.html#a499f4023e0d42356ce71d38cc32bf92aa0fad91cf4fcbc8ab015053bea77090a6">cutlass::Distribution::Uniform</a></div><div class="ttdef"><b>Definition:</b> distribution.h:40</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc_html"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html">cutlass::reference::host::detail::TensorFillDiagonalFunc</a></div><div class="ttdoc">&lt; Layout function </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:494</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4_html_aa894090fefa7f3cc99ec66f5b6e7b7ac"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#aa894090fefa7f3cc99ec66f5b6e7b7ac">cutlass::reference::host::detail::RandomUniformFunc&lt; complex&lt; Element &gt; &gt;::RandomUniformFunc</a></div><div class="ttdeci">RandomUniformFunc(uint64_t seed_=0, double max=1, double min_=0, int int_scale_=-1)</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:363</div></div>
<div class="ttc" id="complex_8h_html"><div class="ttname"><a href="complex_8h.html">complex.h</a></div></div>
<div class="ttc" id="structcutlass_1_1Distribution_html_a499f4023e0d42356ce71d38cc32bf92aa39890d8be86d514207259b1b5dca3ed5"><div class="ttname"><a href="structcutlass_1_1Distribution.html#a499f4023e0d42356ce71d38cc32bf92aa39890d8be86d514207259b1b5dca3ed5">cutlass::Distribution::Gaussian</a></div><div class="ttdef"><b>Definition:</b> distribution.h:40</div></div>
<div class="ttc" id="structcutlass_1_1Distribution_html_afc30b6976acb39e54f061af1bf2870db"><div class="ttname"><a href="structcutlass_1_1Distribution.html#afc30b6976acb39e54f061af1bf2870db">cutlass::Distribution::uniform</a></div><div class="ttdeci">struct cutlass::Distribution::@18::@20 uniform</div><div class="ttdoc">Uniform distribution. </div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc_html_a4a75d3f07143d0a5d98e1d6f3115cfeb"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a4a75d3f07143d0a5d98e1d6f3115cfeb">cutlass::reference::host::detail::TensorFillFunc::TensorView</a></div><div class="ttdeci">TensorView&lt; Element, Layout &gt; TensorView</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:61</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc_html_aa4b7ce383219da51d8021a4c27b3a57b"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html#aa4b7ce383219da51d8021a4c27b3a57b">cutlass::reference::host::detail::TensorFillDiagonalFunc::operator()</a></div><div class="ttdeci">void operator()(Coord&lt; Layout::kRank &gt; const &amp;coord) const </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:517</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc_html_a027d9ae77e068454e8df798018276c18"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html#a027d9ae77e068454e8df798018276c18">cutlass::reference::host::detail::TensorFillDiagonalFunc::diag</a></div><div class="ttdeci">Element diag</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:503</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_html_a0208d33ceb87f0fc273dc17a66a5e990"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a0208d33ceb87f0fc273dc17a66a5e990">cutlass::reference::host::detail::RandomGaussianFunc::operator()</a></div><div class="ttdeci">Element operator()() const </div><div class="ttdoc">Compute random value and update RNG state. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:132</div></div>
<div class="ttc" id="structcutlass_1_1RealType_html_a1905f6f1044cfbf84f7345699246a6ca"><div class="ttname"><a href="structcutlass_1_1RealType.html#a1905f6f1044cfbf84f7345699246a6ca">cutlass::RealType::Type</a></div><div class="ttdeci">T Type</div><div class="ttdef"><b>Definition:</b> real.h:32</div></div>
<div class="ttc" id="structcutlass_1_1Distribution_html_a07cb089b346ef06e198f6043128264fb"><div class="ttname"><a href="structcutlass_1_1Distribution.html#a07cb089b346ef06e198f6043128264fb">cutlass::Distribution::kind</a></div><div class="ttdeci">Kind kind</div><div class="ttdoc">Active variant kind. </div><div class="ttdef"><b>Definition:</b> distribution.h:64</div></div>
<div class="ttc" id="namespacecutlass_1_1reference_1_1host_html_a81b0f81940ce0ecc0d486d2f45659f6e"><div class="ttname"><a href="namespacecutlass_1_1reference_1_1host.html#a81b0f81940ce0ecc0d486d2f45659f6e">cutlass::reference::host::TensorFill</a></div><div class="ttdeci">void TensorFill(TensorView&lt; Element, Layout &gt; dst, Element val=Element(0))</div><div class="ttdoc">Fills a tensor with a uniform value. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:92</div></div>
<div class="ttc" id="classcutlass_1_1TensorView_html_a7d3914dd5042c9c40be9e21a7b4e9ece"><div class="ttname"><a href="classcutlass_1_1TensorView.html#a7d3914dd5042c9c40be9e21a7b4e9ece">cutlass::TensorView::extent</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE TensorCoord const &amp; extent() const </div><div class="ttdoc">Returns the extent of the view (the size along each logical dimension). </div><div class="ttdef"><b>Definition:</b> tensor_view.h:167</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_html_ac39a320d0975f140d51cf2cd7dd53441"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#ac39a320d0975f140d51cf2cd7dd53441">cutlass::reference::host::detail::RandomUniformFunc::RandomUniformFunc</a></div><div class="ttdeci">RandomUniformFunc(uint64_t seed_=0, double max=1, double min_=0, int int_scale_=-1)</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:314</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4_html_a72b71664e9ddc5ce392e1db822cfdada"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a72b71664e9ddc5ce392e1db822cfdada">cutlass::reference::host::detail::RandomGaussianFunc&lt; complex&lt; Element &gt; &gt;::RandomGaussianFunc</a></div><div class="ttdeci">RandomGaussianFunc(uint64_t seed_=0, double mean_=0, double stddev_=1, int int_scale_=-1)</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:170</div></div>
<div class="ttc" id="structcutlass_1_1Distribution_html_ada9c50671b405fabbb0841a093f809de"><div class="ttname"><a href="structcutlass_1_1Distribution.html#ada9c50671b405fabbb0841a093f809de">cutlass::Distribution::gaussian</a></div><div class="ttdeci">struct cutlass::Distribution::@18::@21 gaussian</div><div class="ttdoc">Gaussian distribution. </div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4_html_a6a906b7ae9c17b6ebe2063d652f3ab50"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a6a906b7ae9c17b6ebe2063d652f3ab50">cutlass::reference::host::detail::RandomGaussianFunc&lt; complex&lt; Element &gt; &gt;::int_scale</a></div><div class="ttdeci">int int_scale</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:164</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc_html_a5fd28f9610e15afd33e1e8f56e1b9021"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a5fd28f9610e15afd33e1e8f56e1b9021">cutlass::reference::host::detail::TensorFillFunc::operator()</a></div><div class="ttdeci">void operator()(Coord&lt; Layout::kRank &gt; const &amp;coord) const </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:79</div></div>
<div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div><div class="ttdoc">STL namespace. </div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc_html_a11580631bdb3106d4edd768a76f6ca6f"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html#a11580631bdb3106d4edd768a76f6ca6f">cutlass::reference::host::detail::TensorUpdateOffDiagonalFunc::view</a></div><div class="ttdeci">TensorView view</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:605</div></div>
<div class="ttc" id="namespacecutlass_1_1reference_1_1host_html_a1c81144ca36832a48d04d1b5b6498080"><div class="ttname"><a href="namespacecutlass_1_1reference_1_1host.html#a1c81144ca36832a48d04d1b5b6498080">cutlass::reference::host::TensorFillDiagonal</a></div><div class="ttdeci">void TensorFillDiagonal(TensorView&lt; Element, Layout &gt; dst, Element diag=Element(1), Element other=Element(0))</div><div class="ttdoc">Fills a tensor everywhere with a unique value for its diagonal. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:540</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc_html"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html">cutlass::reference::host::detail::TensorFillLinearFunc</a></div><div class="ttdoc">&lt; Layout function </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:667</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_html_a4c9943f36faab7d4928b1f130d0b784c"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a4c9943f36faab7d4928b1f130d0b784c">cutlass::reference::host::detail::RandomGaussianFunc::int_scale</a></div><div class="ttdeci">int int_scale</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:115</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc_html"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html">cutlass::reference::host::detail::TensorUpdateOffDiagonalFunc</a></div><div class="ttdoc">&lt; Layout function </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:597</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4_html_ad0de7d4946af855288d7f9cccb9a18eb"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#ad0de7d4946af855288d7f9cccb9a18eb">cutlass::reference::host::detail::RandomUniformFunc&lt; complex&lt; Element &gt; &gt;::int_scale</a></div><div class="ttdeci">int int_scale</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:357</div></div>
<div class="ttc" id="namespacecutlass_1_1reference_1_1host_html_a29548cb522d9c147cf34263ecac75d89"><div class="ttname"><a href="namespacecutlass_1_1reference_1_1host.html#a29548cb522d9c147cf34263ecac75d89">cutlass::reference::host::TensorFillIdentity</a></div><div class="ttdeci">void TensorFillIdentity(TensorView&lt; Element, Layout &gt; dst)</div><div class="ttdoc">Helper to fill a tensor&amp;#39;s diagonal with 1 and 0 everywhere else. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:564</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4_html_a6ef7020f1108432fe51853dffb7e727c"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#a6ef7020f1108432fe51853dffb7e727c">cutlass::reference::host::detail::RandomUniformFunc&lt; complex&lt; Element &gt; &gt;::operator()</a></div><div class="ttdeci">complex&lt; Element &gt; operator()() const </div><div class="ttdoc">Compute random value and update RNG state. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:375</div></div>
<div class="ttc" id="namespacecutlass_html_a67f9e83dd59615eff837ea66984c121c"><div class="ttname"><a href="namespacecutlass.html#a67f9e83dd59615eff837ea66984c121c">cutlass::log</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE complex&lt; T &gt; log(complex&lt; T &gt; const &amp;z)</div><div class="ttdoc">Computes the complex exponential of z. </div><div class="ttdef"><b>Definition:</b> complex.h:381</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc_html_a4e447a80bd94cde69fa66f9e9d882b28"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html#a4e447a80bd94cde69fa66f9e9d882b28">cutlass::reference::host::detail::TensorFillGaussianFunc::operator()</a></div><div class="ttdeci">void operator()(Coord&lt; Layout::kRank &gt; const &amp;coord) const </div><div class="ttdoc">Compute random value and update RNG state. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:236</div></div>
<div class="ttc" id="array_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div><div class="ttdoc">Statically sized array of elements that accommodates all CUTLASS-supported numeric types and is safe ...</div></div>
<div class="ttc" id="cutlass_8h_html_a4b1c9f25ab6eaa25e1f2258dd63e6ce4"><div class="ttname"><a href="cutlass_8h.html#a4b1c9f25ab6eaa25e1f2258dd63e6ce4">CUTLASS_PRAGMA_UNROLL</a></div><div class="ttdeci">#define CUTLASS_PRAGMA_UNROLL</div><div class="ttdef"><b>Definition:</b> cutlass.h:110</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_html_a5da7c7b953aa178bb356ba8578245d89"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a5da7c7b953aa178bb356ba8578245d89">cutlass::reference::host::detail::RandomGaussianFunc::mean</a></div><div class="ttdeci">double mean</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:113</div></div>
<div class="ttc" id="namespacecutlass_1_1reference_1_1host_html_a6d146dc0390e4c045f08b5d2adfcf48a"><div class="ttname"><a href="namespacecutlass_1_1reference_1_1host.html#a6d146dc0390e4c045f08b5d2adfcf48a">cutlass::reference::host::TensorUpdateOffDiagonal</a></div><div class="ttdeci">void TensorUpdateOffDiagonal(TensorView&lt; Element, Layout &gt; dst, Element other=Element(1))</div><div class="ttdoc">Writes a uniform value to all elements in the tensor without modifying diagonal elements. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:643</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc_html_a83ca72169299439a087871b794750c38"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#a83ca72169299439a087871b794750c38">cutlass::reference::host::detail::TensorFillLinearFunc::s</a></div><div class="ttdeci">Element s</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:677</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc_html_aa47ca9b4e4187f4eee4f332b6cd855bb"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#aa47ca9b4e4187f4eee4f332b6cd855bb">cutlass::reference::host::detail::TensorFillLinearFunc::v</a></div><div class="ttdeci">Array&lt; Element, Layout::kRank &gt; v</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:676</div></div>
<div class="ttc" id="classcutlass_1_1TensorView_html"><div class="ttname"><a href="classcutlass_1_1TensorView.html">cutlass::TensorView&lt; Element, Layout &gt;</a></div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4_html_abd7e66b999df7719f6ac77f0a82a0d5d"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#abd7e66b999df7719f6ac77f0a82a0d5d">cutlass::reference::host::detail::RandomUniformFunc&lt; complex&lt; Element &gt; &gt;::Real</a></div><div class="ttdeci">typename RealType&lt; Element &gt;::Type Real</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:352</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc_html_a9c559d6186d27c3d343d92830e989832"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html#a9c559d6186d27c3d343d92830e989832">cutlass::reference::host::detail::TensorFillGaussianFunc::view</a></div><div class="ttdeci">TensorView view</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:219</div></div>
<div class="ttc" id="namespacecutlass_1_1reference_1_1host_html_a5187d9f07f2b1edebfbad067c7a84826"><div class="ttname"><a href="namespacecutlass_1_1reference_1_1host.html#a5187d9f07f2b1edebfbad067c7a84826">cutlass::reference::host::TensorFillRandomGaussian</a></div><div class="ttdeci">void TensorFillRandomGaussian(TensorView&lt; Element, Layout &gt; dst, uint64_t seed, double mean=0, double stddev=1, int bits=-1)</div><div class="ttdoc">Fills a tensor with random values with a Gaussian distribution. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:249</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4_html_a4c1cec1d0871654b9e3c5cf132099034"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a4c1cec1d0871654b9e3c5cf132099034">cutlass::reference::host::detail::RandomGaussianFunc&lt; complex&lt; Element &gt; &gt;::stddev</a></div><div class="ttdeci">double stddev</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:163</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4_html_a04ad19f3f63c0cba77a76a2ce243b727"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a04ad19f3f63c0cba77a76a2ce243b727">cutlass::reference::host::detail::RandomGaussianFunc&lt; complex&lt; Element &gt; &gt;::operator()</a></div><div class="ttdeci">complex&lt; Element &gt; operator()() const </div><div class="ttdoc">Compute random value and update RNG state. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:181</div></div>
<div class="ttc" id="namespacecutlass_1_1reference_1_1host_html_ac23a650217ddd1640807c2e91e69ab91"><div class="ttname"><a href="namespacecutlass_1_1reference_1_1host.html#ac23a650217ddd1640807c2e91e69ab91">cutlass::reference::host::TensorFillLinear</a></div><div class="ttdeci">void TensorFillLinear(TensorView&lt; Element, Layout &gt; dst, Array&lt; Element, Layout::kRank &gt; const &amp;v, Element s=Element(0))</div><div class="ttdoc">Fills tensor with a linear combination of its coordinate and another vector. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:715</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc_html"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html">cutlass::reference::host::detail::TensorFillGaussianFunc</a></div><div class="ttdoc">Computes a random Gaussian distribution. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:211</div></div>
<div class="ttc" id="namespacecutlass_1_1reference_1_1host_html_acbf747241e8ac6ef9b1702b735a7913e"><div class="ttname"><a href="namespacecutlass_1_1reference_1_1host.html#acbf747241e8ac6ef9b1702b735a7913e">cutlass::reference::host::TensorUpdateDiagonal</a></div><div class="ttdeci">void TensorUpdateDiagonal(TensorView&lt; Element, Layout &gt; dst, Element val=Element(1))</div><div class="ttdoc">Writes a uniform value to the diagonal of a tensor without modifying off-diagonal elements...</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:577</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc_html_a92cd583574fa8f7c4b19aea08b380476"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html#a92cd583574fa8f7c4b19aea08b380476">cutlass::reference::host::detail::TensorFillRandomUniformFunc::view</a></div><div class="ttdeci">TensorView view</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:412</div></div>
<div class="ttc" id="structcutlass_1_1ReferenceFactory_html"><div class="ttname"><a href="structcutlass_1_1ReferenceFactory.html">cutlass::ReferenceFactory</a></div><div class="ttdef"><b>Definition:</b> subbyte_reference.h:557</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc_html_a660184169f203d2499799692b136d589"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#a660184169f203d2499799692b136d589">cutlass::reference::host::detail::TensorFillLinearFunc::operator()</a></div><div class="ttdeci">void operator()(Coord&lt; Layout::kRank &gt; const &amp;coord) const </div><div class="ttdoc">Updates the tensor. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:694</div></div>
<div class="ttc" id="namespacecutlass_1_1reference_1_1host_html_a121079d5cb24dd0e0339cee552a854de"><div class="ttname"><a href="namespacecutlass_1_1reference_1_1host.html#a121079d5cb24dd0e0339cee552a854de">cutlass::reference::host::BlockFillRandomGaussian</a></div><div class="ttdeci">void BlockFillRandomGaussian(Element *ptr, size_t capacity, uint64_t seed, double mean=0, double stddev=1, int bits=-1)</div><div class="ttdoc">Fills a tensor with random values with a Gaussian distribution. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:277</div></div>
<div class="ttc" id="distribution_8h_html"><div class="ttname"><a href="distribution_8h.html">distribution.h</a></div><div class="ttdoc">This header contains a class to parametrize a statistical distribution function. </div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc_html_a6f88183d1f98e77cc1225efa92be128b"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html#a6f88183d1f98e77cc1225efa92be128b">cutlass::reference::host::detail::TensorFillDiagonalFunc::view</a></div><div class="ttdeci">TensorView view</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:502</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc_html_ad52ccd0a3cd4685b52746abe5ad7df71"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#ad52ccd0a3cd4685b52746abe5ad7df71">cutlass::reference::host::detail::TensorFillFunc::value</a></div><div class="ttdeci">Element value</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:68</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_html_a09db614d063fec17a6a2fbe23389f10a"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#a09db614d063fec17a6a2fbe23389f10a">cutlass::reference::host::detail::RandomUniformFunc::operator()</a></div><div class="ttdeci">Element operator()() const </div><div class="ttdoc">Compute random value and update RNG state. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:326</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_html"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html">cutlass::reference::host::detail::RandomUniformFunc</a></div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:301</div></div>
<div class="ttc" id="numeric__types_8h_html"><div class="ttname"><a href="numeric__types_8h.html">numeric_types.h</a></div><div class="ttdoc">Top-level include for all CUTLASS numeric types. </div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc_html_aac8469e704c75d37224294fef6bc8983"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#aac8469e704c75d37224294fef6bc8983">cutlass::reference::host::detail::TensorFillLinearFunc::TensorFillLinearFunc</a></div><div class="ttdeci">TensorFillLinearFunc(TensorView const &amp;view_, Array&lt; Element, Layout::kRank &gt; const &amp;v_, Element s_=Element(0))</div><div class="ttdoc">Constructs functor. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:686</div></div>
<div class="ttc" id="namespacecutlass_1_1platform_html_a57c071d2a7305dd4ec60542e66b0c81c"><div class="ttname"><a href="namespacecutlass_1_1platform.html#a57c071d2a7305dd4ec60542e66b0c81c">cutlass::platform::min</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE constexpr const T &amp; min(const T &amp;a, const T &amp;b)</div><div class="ttdoc">std::min </div><div class="ttdef"><b>Definition:</b> platform.h:183</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_html_a6b96ec27d0f7df4c4a1bd451b29a69fe"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a6b96ec27d0f7df4c4a1bd451b29a69fe">cutlass::reference::host::detail::RandomGaussianFunc::pi</a></div><div class="ttdeci">double pi</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:116</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc_html_a4b610b1ca5801a747afb4a2c5ad0fadd"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html#a4b610b1ca5801a747afb4a2c5ad0fadd">cutlass::reference::host::detail::TensorUpdateOffDiagonalFunc::operator()</a></div><div class="ttdeci">void operator()(Coord&lt; Layout::kRank &gt; const &amp;coord) const </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:618</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4_html_a17c91db74ff727d9f42442c09d21d0b3"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#a17c91db74ff727d9f42442c09d21d0b3">cutlass::reference::host::detail::RandomUniformFunc&lt; complex&lt; Element &gt; &gt;::range</a></div><div class="ttdeci">double range</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:355</div></div>
<div class="ttc" id="namespacecutlass_1_1reference_1_1host_html_a1808624141976837e298340c9f6c0f6b"><div class="ttname"><a href="namespacecutlass_1_1reference_1_1host.html#a1808624141976837e298340c9f6c0f6b">cutlass::reference::host::BlockFillSequential</a></div><div class="ttdeci">void BlockFillSequential(Element *ptr, int64_t capacity, Element v=Element(1), Element s=Element(0))</div><div class="ttdoc">Fills a block of data with sequential elements. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:761</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_html_a4138398f954d5dfd1e968caee2918835"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a4138398f954d5dfd1e968caee2918835">cutlass::reference::host::detail::RandomGaussianFunc::stddev</a></div><div class="ttdeci">double stddev</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:114</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4_html_a61f603633246ab86c8f46e6cbe0f257c"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a61f603633246ab86c8f46e6cbe0f257c">cutlass::reference::host::detail::RandomGaussianFunc&lt; complex&lt; Element &gt; &gt;::pi</a></div><div class="ttdeci">double pi</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:165</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc_html_a65a5f9c6873bea8c693b4b88087cba17"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html#a65a5f9c6873bea8c693b4b88087cba17">cutlass::reference::host::detail::TensorUpdateOffDiagonalFunc::TensorUpdateOffDiagonalFunc</a></div><div class="ttdeci">TensorUpdateOffDiagonalFunc(TensorView const &amp;view_=TensorView(), Element other_=Element(0))</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:612</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_html"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html">cutlass::reference::host::detail::RandomGaussianFunc</a></div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:110</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4_html_a8239acd9e3b11b0b6a3f26f48f18b508"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#a8239acd9e3b11b0b6a3f26f48f18b508">cutlass::reference::host::detail::RandomGaussianFunc&lt; complex&lt; Element &gt; &gt;::seed</a></div><div class="ttdeci">uint64_t seed</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:161</div></div>
<div class="ttc" id="structcutlass_1_1Coord_html"><div class="ttname"><a href="structcutlass_1_1Coord.html">cutlass::Coord&lt; Layout::kRank &gt;</a></div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc_html_a4b365f33d4c2d36c2e8052965bc3c787"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html#a4b365f33d4c2d36c2e8052965bc3c787">cutlass::reference::host::detail::TensorFillGaussianFunc::TensorFillGaussianFunc</a></div><div class="ttdeci">TensorFillGaussianFunc(TensorView view_=TensorView(), RandomGaussianFunc&lt; Element &gt; func_=RandomGaussianFunc&lt; Element &gt;())</div><div class="ttdoc">Construction of Gaussian RNG functor. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:227</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc_html_a05cc631b27ee842d78b48a4a1a16b943"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorUpdateOffDiagonalFunc.html#a05cc631b27ee842d78b48a4a1a16b943">cutlass::reference::host::detail::TensorUpdateOffDiagonalFunc::other</a></div><div class="ttdeci">Element other</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:606</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc_html_ac288b85512ed45e0180987bf5b85dd23"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html#ac288b85512ed45e0180987bf5b85dd23">cutlass::reference::host::detail::TensorFillDiagonalFunc::TensorFillDiagonalFunc</a></div><div class="ttdeci">TensorFillDiagonalFunc(TensorView const &amp;view_=TensorView(), Element diag_=Element(1), Element other_=Element(0))</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:510</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_html_a45ca53d7fcac978533361d8fc5f15311"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc.html#a45ca53d7fcac978533361d8fc5f15311">cutlass::reference::host::detail::RandomGaussianFunc::RandomGaussianFunc</a></div><div class="ttdeci">RandomGaussianFunc(uint64_t seed_=0, double mean_=0, double stddev_=1, int int_scale_=-1)</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:121</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc_html_a49d7728b3b07ddc6e063a8aedf2c292c"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a49d7728b3b07ddc6e063a8aedf2c292c">cutlass::reference::host::detail::TensorFillFunc::view</a></div><div class="ttdeci">TensorView view</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:67</div></div>
<div class="ttc" id="classcutlass_1_1complex_html"><div class="ttname"><a href="classcutlass_1_1complex.html">cutlass::complex</a></div><div class="ttdef"><b>Definition:</b> complex.h:92</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4_html_a8065a5275af20c18429a8f279be98e97"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_3_01complex_3_01Element_01_4_01_4.html#a8065a5275af20c18429a8f279be98e97">cutlass::reference::host::detail::RandomUniformFunc&lt; complex&lt; Element &gt; &gt;::seed</a></div><div class="ttdeci">uint64_t seed</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:354</div></div>
<div class="ttc" id="classcutlass_1_1TensorRef_html_a8758907a1c9b1fcd00e7ece626d03b76"><div class="ttname"><a href="classcutlass_1_1TensorRef.html#a8758907a1c9b1fcd00e7ece626d03b76">cutlass::TensorRef::at</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE Reference at(TensorCoord const &amp;coord) const </div><div class="ttdoc">Returns a reference to the element at a given Coord. </div><div class="ttdef"><b>Definition:</b> tensor_ref.h:307</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_html_ab65f9bd7b329d6ce077daf50fb3148f1"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#ab65f9bd7b329d6ce077daf50fb3148f1">cutlass::reference::host::detail::RandomUniformFunc::range</a></div><div class="ttdeci">double range</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:306</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc_html_a7b3f05b29657f968969b15bd6af4b4c1"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#a7b3f05b29657f968969b15bd6af4b4c1">cutlass::reference::host::detail::TensorFillLinearFunc::TensorFillLinearFunc</a></div><div class="ttdeci">TensorFillLinearFunc()</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:683</div></div>
<div class="ttc" id="namespacecutlass_1_1reference_1_1host_html_a417152b59865d2ef6995ee2398bcea8d"><div class="ttname"><a href="namespacecutlass_1_1reference_1_1host.html#a417152b59865d2ef6995ee2398bcea8d">cutlass::reference::host::BlockFillRandomUniform</a></div><div class="ttdeci">void BlockFillRandomUniform(Element *ptr, size_t capacity, uint64_t seed, double max=1, double min=0, int bits=-1)</div><div class="ttdoc">Fills a tensor with random values with a uniform random distribution. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:470</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc_html_a9272276afdeec7284dfcc6605f153c97"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html#a9272276afdeec7284dfcc6605f153c97">cutlass::reference::host::detail::TensorFillRandomUniformFunc::func</a></div><div class="ttdeci">RandomUniformFunc&lt; Element &gt; func</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:413</div></div>
<div class="ttc" id="namespacecutlass_1_1reference_1_1host_html_a8c798c04df572b34e3ed3976d69f993d"><div class="ttname"><a href="namespacecutlass_1_1reference_1_1host.html#a8c798c04df572b34e3ed3976d69f993d">cutlass::reference::host::TensorForEach</a></div><div class="ttdeci">void TensorForEach(Coord&lt; Rank &gt; extent, Func &amp;func)</div><div class="ttdoc">Iterates over the index space of a tensor. </div><div class="ttdef"><b>Definition:</b> host/tensor_foreach.h:87</div></div>
<div class="ttc" id="namespacecutlass_1_1reference_1_1host_html_a8f1500a3e2cb694323bf9d25bafc0fbc"><div class="ttname"><a href="namespacecutlass_1_1reference_1_1host.html#a8f1500a3e2cb694323bf9d25bafc0fbc">cutlass::reference::host::TensorFillRandomUniform</a></div><div class="ttdeci">void TensorFillRandomUniform(TensorView&lt; Element, Layout &gt; dst, uint64_t seed, double max=1, double min=0, int bits=-1)</div><div class="ttdoc">Fills a tensor with random values with a uniform random distribution. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:443</div></div>
<div class="ttc" id="namespacecutlass_1_1reference_1_1host_html_a224f376c3199603bde4ededa4357eea3"><div class="ttname"><a href="namespacecutlass_1_1reference_1_1host.html#a224f376c3199603bde4ededa4357eea3">cutlass::reference::host::TensorCopyDiagonalIn</a></div><div class="ttdeci">void TensorCopyDiagonalIn(TensorView&lt; Element, Layout &gt; dst, Element const *ptr)</div><div class="ttdoc">Copies a diagonal in from host memory without modifying off-diagonal elements. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:817</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_html_ab3de08baeb9246f5472a1c8ec19c68fa"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#ab3de08baeb9246f5472a1c8ec19c68fa">cutlass::reference::host::detail::RandomUniformFunc::min</a></div><div class="ttdeci">double min</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:307</div></div>
<div class="ttc" id="structcutlass_1_1Distribution_html"><div class="ttname"><a href="structcutlass_1_1Distribution.html">cutlass::Distribution</a></div><div class="ttdoc">Distribution type. </div><div class="ttdef"><b>Definition:</b> distribution.h:38</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc_html_aa6cc9355b27c1d33e351a31bcf4aece7"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillGaussianFunc.html#aa6cc9355b27c1d33e351a31bcf4aece7">cutlass::reference::host::detail::TensorFillGaussianFunc::func</a></div><div class="ttdeci">RandomGaussianFunc&lt; Element &gt; func</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:220</div></div>
<div class="ttc" id="namespacecutlass_1_1reference_1_1host_html_ad6e2cd99b8096eaaf79c0a6edbd3e420"><div class="ttname"><a href="namespacecutlass_1_1reference_1_1host.html#ad6e2cd99b8096eaaf79c0a6edbd3e420">cutlass::reference::host::TensorFillSequential</a></div><div class="ttdeci">void TensorFillSequential(TensorView&lt; Element, Layout &gt; dst, Element s=Element(0))</div><div class="ttdoc">Fills tensor with a linear combination of its coordinate and another vector. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:738</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc_html"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html">cutlass::reference::host::detail::TensorFillFunc</a></div><div class="ttdoc">&lt; Layout function </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:59</div></div>
<div class="ttc" id="structcutlass_1_1Distribution_html_a676b1d8b87691b4218f6ed308e6adfc1"><div class="ttname"><a href="structcutlass_1_1Distribution.html#a676b1d8b87691b4218f6ed308e6adfc1">cutlass::Distribution::int_scale</a></div><div class="ttdeci">int int_scale</div><div class="ttdoc">Random values are cast to integer after scaling by this power of two. </div><div class="ttdef"><b>Definition:</b> distribution.h:67</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc_html_a55353997540e39108d75456f681a703d"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillFunc.html#a55353997540e39108d75456f681a703d">cutlass::reference::host::detail::TensorFillFunc::TensorFillFunc</a></div><div class="ttdeci">TensorFillFunc(TensorView const &amp;view_=TensorView(), Element value_=Element(0))</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:74</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc_html"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html">cutlass::reference::host::detail::TensorFillRandomUniformFunc</a></div><div class="ttdoc">Computes a random Gaussian distribution. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:404</div></div>
<div class="ttc" id="cutlass_8h_html"><div class="ttname"><a href="cutlass_8h.html">cutlass.h</a></div><div class="ttdoc">Basic include for CUTLASS. </div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4_html_ad8c60b0630a2867fd80a0d09a3cf63cd"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomGaussianFunc_3_01complex_3_01Element_01_4_01_4.html#ad8c60b0630a2867fd80a0d09a3cf63cd">cutlass::reference::host::detail::RandomGaussianFunc&lt; complex&lt; Element &gt; &gt;::mean</a></div><div class="ttdeci">double mean</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:162</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc_html_aabd6c175d26c7c370aa7f67034e9c323"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillLinearFunc.html#aabd6c175d26c7c370aa7f67034e9c323">cutlass::reference::host::detail::TensorFillLinearFunc::view</a></div><div class="ttdeci">TensorView view</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:675</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_html_a4cd2d49c1b0042dfa83ead210eec12f7"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#a4cd2d49c1b0042dfa83ead210eec12f7">cutlass::reference::host::detail::RandomUniformFunc::seed</a></div><div class="ttdeci">uint64_t seed</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:305</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc_html_aa192b9b11c26dff5b0279fff30e3731c"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillRandomUniformFunc.html#aa192b9b11c26dff5b0279fff30e3731c">cutlass::reference::host::detail::TensorFillRandomUniformFunc::TensorFillRandomUniformFunc</a></div><div class="ttdeci">TensorFillRandomUniformFunc(TensorView view_=TensorView(), RandomUniformFunc&lt; Element &gt; func_=RandomUniformFunc&lt; Element &gt;())</div><div class="ttdoc">Construction of Gaussian RNG functor. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:420</div></div>
<div class="ttc" id="namespacecutlass_html_a28f05d94dbdfc97cddbeab3a5d23839d"><div class="ttname"><a href="namespacecutlass.html#a28f05d94dbdfc97cddbeab3a5d23839d">cutlass::sqrt</a></div><div class="ttdeci">CUTLASS_HOST_DEVICE complex&lt; T &gt; sqrt(complex&lt; T &gt; const &amp;z)</div><div class="ttdoc">Computes the square root of complex number z. </div><div class="ttdef"><b>Definition:</b> complex.h:393</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc_html_a9b410cf9a05a34317a83cce730f9a348"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1RandomUniformFunc.html#a9b410cf9a05a34317a83cce730f9a348">cutlass::reference::host::detail::RandomUniformFunc::int_scale</a></div><div class="ttdeci">int int_scale</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:308</div></div>
<div class="ttc" id="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc_html_ab5fdecc2fd8df736bf4efe884a8e873e"><div class="ttname"><a href="structcutlass_1_1reference_1_1host_1_1detail_1_1TensorFillDiagonalFunc.html#ab5fdecc2fd8df736bf4efe884a8e873e">cutlass::reference::host::detail::TensorFillDiagonalFunc::other</a></div><div class="ttdeci">Element other</div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:504</div></div>
<div class="ttc" id="namespacecutlass_1_1reference_1_1host_html_ae6171d78c959aefff277cec4cad8fdb3"><div class="ttname"><a href="namespacecutlass_1_1reference_1_1host.html#ae6171d78c959aefff277cec4cad8fdb3">cutlass::reference::host::BlockFillRandom</a></div><div class="ttdeci">void BlockFillRandom(Element *ptr, size_t capacity, uint64_t seed, Distribution dist)</div><div class="ttdoc">Fills a block of data with sequential elements. </div><div class="ttdef"><b>Definition:</b> host/tensor_fill.h:784</div></div>
<div class="ttc" id="host_2tensor__foreach_8h_html"><div class="ttname"><a href="host_2tensor__foreach_8h.html">tensor_foreach.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
